import { createRouter, createWebHashHistory } from "vue-router";
// import type { RouteRecordRaw } from "vue-router";

const routes = [
  {
    path: "/",
    redirect: "/init",
    component: () => import("@/layout/BasicLayout.vue"),
    children: [
      {
        path: "/init",
        name: "init",
        component: () => import("@/views/Init.vue"),
      },
      {
        path: "/home",
        name: "home",
        component: () => import("@/views/home/index.vue"),
        children: [
          {
            path: "/classEvaluation",
            name: "classEvaluation",
            component: () => import("@/views/classEvaluation/index.vue"),
          },
          {
            path: "/enterBehavior",
            name: "enterBehavior",
            component: () => import("@/views/enterBehavior/index.vue"),
            children: [
              {
                path: "/behaviorSelect",
                name: "behaviorSelect",
                component: () => import("@/views/behaviorSelect/index.vue"),
              },
            ],
          },
        ],
      },
      {
        path: "/evaluationCriteria",
        name: "evaluationCriteria",
        component: () => import("@/views/evaluationCriteria/index.vue"),
      },
      {
        path: "/myRecord",
        name: "myRecord",
        component: () => import("@/views/myRecord/index.vue"),
      },
      {
        path: "/empty",
        name: "empty",
        component: () => import("@/views/empty/empty.vue"),
      },
      // {
      //   path: "/classEvaluation",
      //   name: "classEvaluation",
      //   component: () => import("@/views/classEvaluation/index.vue"),
      // },
      // {
      //   path: "/enterBehavior",
      //   name: "enterBehavior",
      //   component: () => import("@/views/enterBehavior/index.vue"),
      //   children: [
      //     {
      //       path: "/behaviorSelect",
      //       name: "behaviorSelect",
      //       component: () => import("@/views/behaviorSelect/index.vue"),
      //     },
      //   ],
      // },
      {
        path: "/recoreDetail",
        name: "recoreDetail",
        component: () => import("@/views/recoreDetail/index.vue"),
      },
      {
        path: "/exportDetail",
        name: "exportDetail",
        component: () => import("@/views/exportDetail/index.vue"),
      },
      {
        path: "/repair",
        name: "repair",
        component: () => import("@/views/repair/index.vue"),
      },
      {
        path: "/repair/detail",
        name: "repairDetail",
        component: () => import("@/views/repair/detail/index.vue"),
      },
      // 设备维修列表
      {
        path: "/repairList",
        name: "repairList",
        component: () => import("@/views/repairList/index.vue"),
      },
      // 设备维修配置
      {
        path: "/repairList/set",
        name: "repairListSet",
        component: () => import("@/views/repairList/set/index.vue"),
      },
      {
        path: "/repairList/set/person",
        name: "repairListSetPerson",
        component: () => import("@/views/repairList/set/person/index.vue"),
      },
    ],
  },
];

const router = createRouter({
  routes,
  history: createWebHashHistory(),
});

export default router;
